package com.easy.frame.servers.sys.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.easy.frame.base.api.pojo.BasePO;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.time.LocalDateTime;

/**
 * 系统用户表
 * <p>
 * TODO fixed
 *
 * @Author zzf
 * @Date 8:46 2020/7/22
 */
@Setter
@Getter
@TableName("sys_user")
@ApiModel("系统用户表")
public class SysUser extends BasePO {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "部门id", dataType = "Integer")
    private Integer departmentId;

    @ApiModelProperty(value = "岗位id", dataType = "Integer")
    private Integer postId;

    @ApiModelProperty(value = "企业微信userId", dataType = "String")
    private String wxUserId;

    @ApiModelProperty(value = "企业微信openId", dataType = "String")
    private String wxOpenId;

    @ApiModelProperty(value = "个人微信二维码图片", dataType = "String")
    private String wxQrcodeImage;

    @ApiModelProperty(value = "编号", dataType = "String")
    private String code;

    @ApiModelProperty(value = "名称", dataType = "String")
    private String name;

    @ApiModelProperty(value = "用户类型", dataType = "Integer")
    private Integer type;

    @ApiModelProperty(value = "性别[0未指定 1男 2女]", dataType = "Integer")
    private Integer gender;

    @ApiModelProperty(value = "登录名", dataType = "String")
    private String username;

    @JsonIgnore
    @ApiModelProperty(value = "密码", dataType = "String")
    private String password;

    @ApiModelProperty(value = "最后登录时间", dataType = "Date", example = "2018-11-11 11:11:11")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
    private LocalDateTime lastLoginTime;

    @ApiModelProperty(value = "状态[1正常，2禁用]", dataType = "Integer")
    private Integer status;

    @ApiModelProperty(value = "离职状态[1在职，2离职]", dataType = "Integer")
    private Integer leaveStatus;

}
